import BuildForm from '@/components/BuildForm/BuildForm';
import CardReveal from '@/components/CardReveal/CardReveal';
import FormattedMessageCustom from '@/components/FormattedMessageCustom/FormattedMessageCustom';
import ImBtn from '@/components/Im/ImBtn';
import OrderStep from '@/components/OrderStep/OrderStep';
import { CONFIG } from '@/constants';
import {
    confirmReceipt,
    getOrderDetail,
    joinConfirm,
    orderCooperateList,
    saveJoinOrder,
    saveJoinPayEndImg,
    saveJoinPayImg,
    saveReleasePayEndImg,
    saveReleasePayImg,
    sendStep,
    stopJoin,
} from '@/servers/api/order';
import { exitCard, formFormat } from '@/utils';
import { ExclamationCircleFilled, PlusOutlined } from '@ant-design/icons';
import {
    FormattedMessage,
    getLocale,
    history,
    useIntl,
    useLocation,
    useModel,
} from '@umijs/max';
import {
    Alert,
    Avatar,
    Button,
    Col,
    Descriptions,
    Image,
    List,
    Modal,
    Row,
    Select,
    Space,
    Statistic,
    Typography,
    Upload,
    UploadFile,
    message,
} from 'antd';
import { useEffect, useRef, useState } from 'react';
import { formRules, mapForm, mapFormItems } from '../buildFormItems';
import { getFormItems } from '../process/formItem';
import SubmitStep from './SubmitStep';
import './published.less';
type IParams = {
    status: string;
    id: number;
};
const NewsForm: React.FC = () => {
    const { Countdown } = Statistic;
    const { confirm } = Modal;
    const { Title } = Typography;
    const intl = useIntl();
    const location = useLocation();
    const lang = getLocale();
    const state = location.state as IParams;
    // options.status // 0=已发布,1=已参与,2=进行中，3=已完成
    let template = {
        current: false, //是否被选中
        cardArr: [
            {
                key: 'join_user.avatar',
                title: intl.formatMessage({ id: '头像' }),
                isIcon: true,
                images: [],
            },
            {
                key: 'product',
                title: intl.formatMessage({ id: '名称' }),
                message: '',
            },
            {
                key: 'join_user.label',
                title: intl.formatMessage({ id: '标签' }),
                isIcon: true,
                images: [],
            },
            {
                key: 'con_text',
                title: '合作内容',
                message: '',
            },
            {
                key: 'price_ranking',
                title: '当前价格排名',
                message: '',
            },
            {
                key: 'speed_ranking',
                title: '当前速度排名',
                message: '',
            },
            {
                key: 'num_ranking',
                title: '当前综合排名',
                message: '',
            },
        ],
    };
    let templates = {
        current: false, //是否被选中
        cardArr: [
            {
                key: 'join_user.avatar',
                title: intl.formatMessage({ id: '头像' }),
                isIcon: true,
                images: [],
            },
            {
                key: 'product',
                title: intl.formatMessage({ id: '名称' }),
                message: '',
            },
            {
                key: 'join_user.label',
                title: intl.formatMessage({ id: '标签' }),
                isIcon: true,
                images: [],
            },
            {
                key: 'con_text',
                title: '合作内容',
                message: '',
            },
            {
                key: 'pay_margin',
                title: '是否缴纳保证金',
                message: '',
            },
            {
                key: 'price_ranking',
                title: '当前价格排名',
                message: '',
            },
            {
                key: 'speed_ranking',
                title: '当前速度排名',
                message: '',
            },
            {
                key: 'num_ranking',
                title: '当前综合排名',
                message: '',
            },
        ],
    };
    const isStort = useRef('');
    //价格
    const [value1, setvalue1] = useState('');
    //速度
    const [value2, setvalue2] = useState('');
    //综合排序
    const [value3, setvalue3] = useState('');
    const options1 = [
        {
            label: intl.formatMessage({ id: '正序' }),
            label_ru: intl.formatMessage({ id: '正序' }),
            value: 'ASC',
        },
        {
            label: intl.formatMessage({ id: '倒序' }),
            label_ru: intl.formatMessage({ id: '倒序' }),
            value: 'DESC',
        },
    ];
    //速度下拉菜单
    const options2 = [
        {
            label: intl.formatMessage({ id: '正序' }),
            label_ru: intl.formatMessage({ id: '正序' }),
            value: 'ASC',
        },
        {
            label: intl.formatMessage({ id: '倒序' }),
            label_ru: intl.formatMessage({ id: '倒序' }),
            value: 'DESC',
        },
    ];
    //综合排序菜单
    const options3 = [
        {
            label: intl.formatMessage({ id: '正序' }),
            label_ru: intl.formatMessage({ id: '正序' }),
            value: 'ASC',
        },
        {
            label: intl.formatMessage({ id: '倒序' }),
            label_ru: intl.formatMessage({ id: '倒序' }),
            value: 'DESC',
        },
    ];
    // 以上为合作列表新增的
    const [dataes, setdataes] = useState([]);
    const show = useRef(false);
    const content = intl.formatMessage({ id: '是否终止参与？' });
    const buttonStyle1 = {
        // width: '171rpx',
        height: '49rpx',
        borderRadius: '14rpx',
        border: ' 2rpx solid #979797',
        fontSize: '29rpx',
        marginTop: '20rpx',
        fontWeight: '400',
        color: '#000000',
        lineHeight: '30rpx',
    };
    const buttonStyle2 = {
        // width: '171rpx',
        height: '49rpx',
        fontSize: '29rpx',
        marginTop: '20rpx',
        fontWeight: '600',
        color: '#FFFFFF',
        lineHeight: '30rpx',
        border: '0rpx',
        background: 'linear-gradient(310deg, #F69528 0%, #DD2910 100%)',
        borderRadius: ' 14rpx',
    };
    const page = useRef(1);
    const joinList = useRef([
        {
            key: 'join_user.avatar',
            title: intl.formatMessage({ id: '头像' }),
            isIcon: true,
            images: [],
        },
        {
            key: 'join_user.username',
            title: intl.formatMessage({ id: '名称' }),
            message: '',
        },
        {
            key: 'join_user.label',
            title: intl.formatMessage({ id: '标签' }),
            isIcon: true,
            images: [],
        },
        {
            key: 'join_user.rating',
            title: intl.formatMessage({ id: '评分' }),
            message: '',
        },
        {
            key: 'con_text',
            title: intl.formatMessage({ id: '合作内容' }),
            message: '',
        },
        {
            key: 'pay_margin',
            title: intl.formatMessage({ id: '是否缴纳保证金' }),
            message: '',
        },
        {
            key: 'price_ranking',
            title: intl.formatMessage({ id: '当前价格排名' }),
            message: '',
        },
        {
            key: 'speed_ranking',
            title: intl.formatMessage({ id: '当前速度排名' }),
            message: '',
        },
        {
            key: 'num_ranking',
            title: intl.formatMessage({ id: '当前综合排名' }),
            message: '',
        },
    ]);
    const formItems = useRef();
    const orderJoin = useRef([
        {
            key: 'join_user.avatar',
            title: intl.formatMessage({ id: '头像' }),
            isIcon: true,
            images: [],
        },
        {
            key: 'join_user.username',
            title: intl.formatMessage({ id: '名称' }),
            message: '',
        },
        {
            key: 'join_user.label',
            title: intl.formatMessage({ id: '标签' }),
            isIcon: true,
            images: [],
        },
        {
            key: 'con_text',
            title: intl.formatMessage({ id: '合作内容' }),
            message: '',
        },
        {
            key: 'join_user.rating',
            title: intl.formatMessage({ id: '评分' }),
            message: '',
        },
        {
            key: 'margin_text',
            title: intl.formatMessage({ id: '保证金' }),
            message: '',
        },
        {
            key: 'price_ranking',
            title: intl.formatMessage({ id: '当前价格排名' }),
            message: '',
        },
        {
            key: 'speed_ranking',
            title: intl.formatMessage({ id: '当前速度排名' }),
            message: '',
        },
        {
            key: 'num_ranking',
            title: intl.formatMessage({ id: '当前综合排名' }),
            message: '',
        },
    ]);
    const formJoin = useRef();
    const joinListData = useRef();
    const [joinListDataState, setJoinListDataState] = useState([]);
    const orderData = useRef();
    const [releasePayImgList, setreleasePayImgList] = useState<UploadFile[]>();
    const [releasePayEndImgList, setreleasePayEndImgList] =
        useState<UploadFile[]>();
    const mobile = useRef();
    const [to_mobile, setto_mobile] = useState();
    const [user_type, setuser_type] = useState('');
    const orderid = useRef();
    const [status, setStatus] = useState('0');
    const [options_status,setoptions_status] = useState('');
    const orderInfo = useRef();
    const joinId = useRef();
    const orderJoinData = useRef();
    const [orderJoinDataState, setOrderJoinDataState] = useState();
    const [countdownTime,setcountdownTime] = useState(0);
    const formJoinDetail = useRef();
    const [stepList, setstepList] = useState([]);
    const loading = useRef(false);
    const user_id = useRef(0);
    const showFinishedTime = useRef(false);
    const form = useRef({
        step: '',
        title: '',
        finishedtime: '',
    });
    const orderType = {
        goods: '货物',
        transport: '运输',
        professional: '专业代办',
        crossborder: '跨境货代',
    };
    const releaseType = {
        1: '有车求货',
        2: '有货求车',
        3: '人力捎货',
    };
    const finishedTimeParams = useRef({
        year: true,
        month: true,
        day: true,
        hour: true,
        minute: true,
        second: false,
        timestamp: true,
    });
    const finishedTimeText = useRef('');
    const releasePayImgUrl = useRef();
    const pay_type = useRef('');
    const detailType = useRef('order_join');
    const showJoinPayImg = useRef(false);
    const showJoinPayEndImg = useRef(false);
    const showPayType = useRef(false);
    const showExtension = useRef(false);
    const stepImgList = useRef([]);
    const releasePayEndImgUrl = useRef('');
    const releasePayImgDeletable = useRef(true);
    const releasePayEndImgDeletable = useRef(true);
    const contentJoin = useRef(
        intl.formatMessage({ id: '对方已确认收货，是否收到全部货款或尾款？' }),
    );
    const contentJoinPayImg = useRef(
        intl.formatMessage({ id: '是否确认打款？' }),
    );
    const contentJoinPayEndImg = useRef(
        intl.formatMessage({ id: '是否确认打款？' }),
    );
    const contentExtension = useRef(
        intl.formatMessage({ id: '是否同意延期付款？' }),
    );
    const releasePayImgAction = CONFIG.HTTP_REQUEST_URL + '/common/upload';
    const [orderDataState, setorderDataState] = useState<IBuildForm.IDefault>();
    function orderCooperateLists(data) {
        orderCooperateList(data).then((res) => {
            setdataes(res.data);
        });
    }
    function getOrderDetailFun() {
        orderData.current = [];
        joinListData.current = [];
        setJoinListDataState([]);
        setreleasePayImgList([]);
        setreleasePayEndImgList([]);
        // console.log('getOrderDetail', this.status)
        const nowTime = new Date().getTime() / 1000;
        getOrderDetail({
            id: state.id,
            status: state.status,
        })
            .then((response) => {
                const res = response.data;
                user_id.current = res.user_id;
                mobile.current = res.mobile;
                setto_mobile(res.to_mobile);
                if (res.user_id === res.orderInfo.release_user_id) {
                    // 发布方
                    setuser_type('release');
                } else if (res.user_id === res.orderInfo.join_user_id) {
                    // 参与方（进行中）- 合作方
                    setuser_type('join');
                } else {
                    setuser_type('join_no'); // 参与方，未达成合作
                    // if (res.orderJoin.id) {
                    //     if (res.user_id === res.orderJoin.join_user_id) {// 参与方，未达成合作
                    //         that.user_type = 'join_no'
                    //     }
                    // }
                    // that.$u.toast('订单信息错误')
                    // return false
                }
                console.log('user_type========', user_type);
                orderData.current = res.orderInfo;
                setorderDataState(res.orderInfo);
                orderid.currnet = res.orderInfo.id;
                setStatus(res.orderInfo.status);
                // status.currnet = res.orderInfo.status;
                orderInfo.current = exitCard(
                    orderInfo.current,
                    res.orderInfo,
                    intl,
                );
                if (res.joinList.length > 0) {
                    joinListData.current = res.joinList;
                    setJoinListDataState(res.joinList);
                    // console.log('joinListData========', this.joinListData)
                    joinList.current = exitCard(
                        joinList.current,
                        res.joinList[0],
                        intl,
                    );
                    joinId.current = res.joinList[0].id;
                }
                if (res.orderJoin.id) {
                    res.orderJoin.number_unit =
                        res.orderInfo.release_info.number_unit;
                    orderJoinData.current = res.orderJoin;
                    setOrderJoinDataState(res.orderJoin);
                    // 新增-不同类型显示不同表单
                    formItems.current = getFormItems(
                        res.orderJoin.type,
                        res.orderInfo.release_info,
                    );
                    // that.formLoading = true
                    let reach_time = res.orderJoin.reach_time;
                    let countdown_time = res.orderJoin.countdown_time;
                    // 倒计时时间 速度*天数 转换称秒数
                    setcountdownTime(countdown_time - nowTime)
                    console.log('倒计时结束时间', countdown_time - nowTime);
                    orderJoin.current = exitCard(
                        orderJoin.current,
                        res.orderJoin,
                        intl,
                    );
                    joinId.current = res.orderJoin.id;
                    // 参与方修改参与信息
                    formJoinDetail.current = orderJoinData.current;
                    mapFormItems(
                        formItems.current,
                        formJoinDetail.current,
                    ).then((mapRes) => {
                        formItems.current = mapRes;
                    });
                    mapForm(formItems.current, state.id).then((formRes) => {
                        formJoin.current = formRes;
                    });
                }
                if (res.stepList.length > 0) {
                    setstepList(res.stepList);
                }
                // 打款证明图片
                if (orderData.current.release_pay_status === '1') {
                    releasePayImgDeletable.current = false;
                    setreleasePayImgList([
                        {
                            uid: '-1',
                            status: 'done',
                            url:
                                CONFIG.IMAGE_URL +
                                orderData.current.release_pay_img,
                        },
                    ]);
                }
                // 尾款证明图片
                if (orderData.current.release_pay_end_status === '1') {
                    releasePayEndImgDeletable.current = false;
                    setreleasePayEndImgList([
                        {
                            uid: '-1',
                            status: 'done',
                            url:
                                CONFIG.IMAGE_URL +
                                orderData.current.release_pay_end_img,
                        },
                    ]);
                }
            })
            .catch((err) => {
                console.log(err);
            });
    }
    function goDetail() {
        history.push('/detail', {
            id: orderData.current.release_id,
            type: 2,
            releaseType: orderData.current.type,
            status: orderData.current.status,
        });
    }
    function goHzDetail() {
        history.push('/cooperate', {
            order_id: state.id,
            join_order_id: joinId.current,
            showBtn: 0,
        });
    }
    const [type, setType] = useState();
    function clear() {
        page.current = 1;
        setvalue1('');
        setvalue2('');
        setvalue3('');
        setType(null);
        isStort.current = '';
    }
    function change(e, value) {
        clear();
        setType(value);
        isStort.current = e;
        switch (value) {
            case 'ranking_score':
                //综合
                setvalue3(e);
                break;
            case 'price':
                //价钱
                setvalue1(e);
                break;
            case 'speed':
                //速度
                setvalue2(e);
                break;
        }
        orderCooperateLists({
            order_id: state.id,
            page: page.current,
            sort: value,
            order: e,
        });
    }
    // 参与方 - 提交修改参与的信息
    function onFinish(val: IBuildForm.IDefault) {
        const params = formFormat(val, formItems.current);
        formJoin.current.release_id = orderJoinData.current?.release_id;
        formJoin.current.type = orderJoinData.current?.type;
        formJoin.current.openid = '';
        formJoin.current.speed_unit = orderJoinData.current?.speed_unit;
        formJoin.current.price_unit = orderJoinData.current?.price_unit;
        if (!formRules(formItems.current, formJoin.current, intl)) {
            return false;
        }
        if (formJoin.current.is_margin === '2') {
            if (formJoin.current.margin_amount * 1 === 0) {
                formJoin.current.is_margin = '1';
            }

            if (lang === 'ru-RU') {
                formJoin.current.is_margin = '1';
            }
        }

        // 支付环境判断
        if (form.current.is_margin === '2') {
            if (lang === 'zh-CN') {
                // if (plat === 'web') {
                //     that.$u.toast(this.$t('请在小程序或App中支付'));
                //     return;
                // }
                if (pay_type.current === '') {
                    showPayType.current = true;
                    return;
                }
            } else {
                form.current.is_margin = '1';
            }
        }
        form.current.pay_type = 'wxpay'; //wxpay  alipay
        form.current.method = 'web';

        saveJoinOrder({ ...formJoin.current, ...params })
            .then((res) => {
                message.success(intl.formatMessage({ id: '操作成功' }));
                // console.log(res)
                if (formJoin.current.is_margin === '2') {
                    message.error(
                        intl.formatMessage({ id: '请在小程序或App中支付' }),
                    );
                } else {
                    getOrderDetailFun();
                }
            })
            .catch((err) => {
                console.log(err);
            });
    }
    useEffect(() => {
        orderCooperateLists({
            order_id: state.id,
            page: page.current,
        });
        setoptions_status(state.status.toString())// 0=已发布,1=已参与,2=进行中，3=已完成
        getOrderDetailFun();
    }, []);
    const beforeUpload = (file: any) => {
        const isJpgOrPng =
            file.type === 'image/jpeg' || file.type === 'image/png';
        if (!isJpgOrPng) {
            message.error('You can only upload JPG/PNG file!');
        }
        const isLt2M = file.size / 1024 / 1024 < 2;
        if (!isLt2M) {
            message.error('Image must smaller than 2MB!');
        }
        return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
    };
    const uploadButton = (
        <button style={{ border: 0, background: 'none' }} type="button">
            <PlusOutlined />
            <div style={{ marginTop: 8 }}>Upload</div>
        </button>
    );
    function doSaveReleasePayImg() {
        if (releasePayImgUrl.current === '') {
            message.error(intl.formatMessage({ id: '上传打款证明图片' }));
            return false;
        }
        saveReleasePayImg({
            order_id: state.id,
            user_id: user_id.current,
            release_pay_img: releasePayImgUrl.current,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '操作成功' }));
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    function releasePayImgSuccess(info: any) {
        if (info.file.status === 'uploading') {
            return;
        }
        if (info.file.status === 'done') {
            // Get this url from response in real world.
            releasePayImgUrl.current = info.file.response.data?.url;
            doSaveReleasePayImg();
        }
    }
    function doSaveReleasePayEndImg() {
        if (releasePayEndImgUrl.current === '') {
            message.error(intl.formatMessage({ id: '上传尾款证明图片' }));
            return false;
        }
        saveReleasePayEndImg({
            order_id: state.id,
            user_id: user_id.current,
            release_pay_end_img: releasePayEndImgUrl.current,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '操作成功' }));
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    function releasePayEndImgSuccess(info) {
        if (info.file.status === 'uploading') {
            return;
        }
        if (info.file.status === 'done') {
            // Get this url from response in real world.
            releasePayEndImgUrl.current = info.file.response.data?.url;
            doSaveReleasePayEndImg();
        }
    }

    const { initialState } = useModel('@@initialState');
    const { createC2CConversation } = useModel('useTencentIm');
    function communicate(toMobile: string) {
        if (initialState?.user) {
            createC2CConversation(toMobile, initialState.user.mobile).catch(
                (e) => {
                    message.error('聊天共同功能未开启');
                },
            );
        }
    }
    function cooperate1(item) {
        let join_order_id = item.id;
        history.push('/cooperate', {
            order_id: state.id,
            join_order_id: join_order_id,
        });
    }
    function saveJoinPayImgFun() {
        saveJoinPayImg({
            order_id: state.id,
            user_id: user_id.current,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '操作成功' }));
                getOrderDetailFun();
            })
            .catch((err) => {
                console.log(err);
            });
    }
    function doSaveJoinPayImg() {
        confirm({
            title: intl.formatMessage({ id: '确认' }),
            icon: <ExclamationCircleFilled />,
            content: contentJoinPayImg.current,
            okText: intl.formatMessage({ id: '确认' }),
            cancelText: intl.formatMessage({ id: '取消' }),
            onOk() {
                saveJoinPayImgFun();
            },
            onCancel() {
                message.warning(intl.formatMessage({ id: '已取消' }));
            },
        });
    }
    function stopConfirm() {
        stopJoin({
            order_id: state.id,
            join_order_id: joinId.current,
        })
            .then(() => {
                message.success(intl.formatMessage({ id: '终止参与成功' }));
                history.push('/order');
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    // 终止参与
    function stopJoinFun() {
        confirm({
            title: intl.formatMessage({ id: '确认' }),
            icon: <ExclamationCircleFilled />,
            content: content,
            okText: intl.formatMessage({ id: '确认' }),
            cancelText: intl.formatMessage({ id: '取消' }),
            onOk() {
                stopConfirm();
            },
            onCancel() {
                message.warning(intl.formatMessage({ id: '已取消' }));
            },
        });
    }
    // 选择合作
    function cooperate() {
        history.push('/cooperate', {
            order_id: state.id,
            join_order_id: joinId.current,
        });
    }
    // 确认收货
    function orderConfirm() {
        confirmReceipt({
            order_id: state.id,
            join_order_id: joinId.current,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '确认收货成功' }));
                getOrderDetailFun();
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    // 订单评价
    function doEvaluate() {
        if (user_type === 'join') {
            // 我为参与方-评价发布方
            if (orderDataState?.join_rate_status === '1') {
                history.push('/takepart', {
                    type: 'join',
                    order_id: state.id,
                });
            } else {
                history.push('/evaluation', {
                    type: '2',
                    order_no: orderDataState?.order_no,
                    show_desire_price: orderDataState?.show_desire_price,
                    order_id: state.id,
                });
            }
        } else {
            // 我为发布方-评价参与方
            if (orderDataState?.release_rate_status === '1') {
                history.push('/takepart', {
                    type: 'release',
                    order_id: state.id,
                });
            } else {
                history.push('/evaluation', {
                    type: '1',
                    order_no: orderDataState?.order_no,
                    show_desire_price: orderDataState?.show_desire_price,
                    order_id: state.id,
                });
            }
        }
    }
    function saveJoinPayEndImgFun() {
        saveJoinPayEndImg({
            order_id: state.id,
            user_id: user_id.current,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '操作成功' }));
                getOrderDetailFun();
            })
            .catch((err) => {
                console.log(err);
            });
    }
    function doSaveJoinPayEndImg() {
        confirm({
            title: intl.formatMessage({ id: '确认' }),
            icon: <ExclamationCircleFilled />,
            content: contentJoinPayEndImg.current,
            okText: intl.formatMessage({ id: '确认' }),
            cancelText: intl.formatMessage({ id: '取消' }),
            onOk() {
                saveJoinPayEndImgFun();
            },
            onCancel() {
                message.warning(intl.formatMessage({ id: '已取消' }));
            },
        });
    }
    function orderJoinConfirm(status: string) {
        joinConfirm({
            order_id: state.id,
            join_order_id: joinId.current,
            status: status,
        })
            .then(() => {
                message.success(intl.formatMessage({ id: '操作成功' }));
                getOrderDetailFun();
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    function showJoin(type: string) {
        confirm({
            title: intl.formatMessage({ id: '确认' }),
            icon: <ExclamationCircleFilled />,
            content: contentJoin.current,
            okText: intl.formatMessage({ id: '已收到' }),
            cancelText: intl.formatMessage({ id: '未收到' }),
            onOk() {
                orderJoinConfirm(type);
            },
            onCancel() {
                confirm({
                    title: intl.formatMessage({ id: '确认' }),
                    icon: <ExclamationCircleFilled />,
                    content: contentExtension.current,
                    okText: intl.formatMessage({ id: '同意' }),
                    cancelText: intl.formatMessage({ id: '不同意' }),
                    onOk() {
                        orderJoinConfirm('8');
                    },
                    onCancel() {
                        orderJoinConfirm('9');
                    },
                });
            },
        });
    }
    // 提交售后
    function goAfterSale() {
        history.push('/afterSale', { order_id: state.id });
    }
    function sendStepFun(e, form) {
        let params = {
            ...e,
            finishedtime: parseInt(new Date().getTime() / 1000),
            order_id: state.id,
            order_join_id: joinId.current,
        };
        sendStep({
            ...params,
        })
            .then((res) => {
                message.success(intl.formatMessage({ id: '进度上传成功' }));
                setTimeout(() => {
                    // 清空进度上传输入框
                    // that.form.step = '';
                    // that.form.title = '';
                    // that.form.finishedtime = '';
                    // that.stepImgList = [];
                    // that.getOrderDetail();
                }, 1000);
                getOrderDetailFun();
                form.resetFields();
            })
            .catch((err) => {
                message.error(err.msg);
                console.log(err);
            });
    }
    return (
        <>
            <Descriptions
                title={
                    user_type === 'release'
                        ? intl.formatMessage({ id: '我发布的' })
                        : intl.formatMessage({ id: '我参与的' })
                }
                extra={
                    <Space>
                        <Button
                            type="primary"
                            onClick={() => {
                                goDetail();
                            }}
                        >
                            <FormattedMessage id="查看详情"></FormattedMessage>
                        </Button>
                        {options_status === '2' && (
                            <Button
                                type="primary"
                                ghost
                                className="warning"
                                onClick={() => {
                                    goHzDetail();
                                }}
                            >
                                <FormattedMessage id="合作信息"></FormattedMessage>
                            </Button>
                        )}
                    </Space>
                }
            >
                <Descriptions.Item
                    label={intl.formatMessage({ id: '货物名称' })}
                >
                    {
                        orderDataState?.release_info[
                            intl.formatMessage({ id: 'item.name' })
                        ]
                    }
                </Descriptions.Item>
                <Descriptions.Item
                    label={intl.formatMessage({ id: '所属行业' })}
                >
                    <FormattedMessageCustom
                        id={orderType[orderDataState?.type]}
                    ></FormattedMessageCustom>
                </Descriptions.Item>
                {['professional'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '个人姓名' })}
                    >
                        {
                            orderDataState?.release_info[
                                intl.formatMessage({ id: 'item.person_name' })
                            ]
                        }
                    </Descriptions.Item>
                )}
                {['professional'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '专业技能' })}
                    >
                        {
                            orderDataState?.release_info[
                                intl.formatMessage({ id: 'item.skill' })
                            ]
                        }
                    </Descriptions.Item>
                )}
                {['transport'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '发布类型' })}
                    >
                        {intl.formatMessage({
                            id: releaseType[
                                orderDataState?.release_info['release_type']
                            ],
                        })}
                    </Descriptions.Item>
                )}
                {['goods'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '期望价格' })}
                    >
                        {orderDataState?.show_desire_price}
                    </Descriptions.Item>
                )}
                {['transport'].indexOf(orderDataState?.type) !== -1 &&
                    orderDataState?.release_info.release_type === '1' && (
                        <Descriptions.Item
                            label={intl.formatMessage({ id: '期望运费' })}
                        >
                            {orderDataState?.release_info.desire_price}
                        </Descriptions.Item>
                    )}
                {['transport'].indexOf(orderDataState?.type) !== -1 &&
                    orderDataState?.release_info.release_type === '2' && (
                        <Descriptions.Item
                            label={intl.formatMessage({ id: '运费出价' })}
                        >
                            {orderDataState?.release_info.freight_price}
                        </Descriptions.Item>
                    )}
                {['transport'].indexOf(orderDataState?.type) !== -1 &&
                    orderDataState?.release_info.release_type === '3' && (
                        <Descriptions.Item
                            label={intl.formatMessage({ id: '出价' })}
                        >
                            {orderDataState?.release_info.desire_price}
                        </Descriptions.Item>
                    )}
                {['goods', 'transport', 'crossborder'].indexOf(
                    orderDataState?.type,
                ) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '保证金金额' })}
                    >
                        {orderDataState?.show_margin_price}
                    </Descriptions.Item>
                )}
                {['goods'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '数量' })}
                    >
                        {
                            orderDataState[
                                intl.formatMessage({
                                    id: 'item.show_goods_num',
                                })
                            ]
                        }
                        {intl.formatMessage({
                            id: orderDataState?.release_info.number_unit,
                        })}
                    </Descriptions.Item>
                )}
                {['goods'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '收货地址' })}
                    >
                        {
                            orderDataState?.show_reach_city[
                                intl.formatMessage({
                                    id: 'item.city.mergename',
                                })
                            ]
                        }
                    </Descriptions.Item>
                )}
                {['goods'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '付款方式' })}
                    >
                        {intl.formatMessage({
                            id: orderDataState?.show_pay_type.text,
                        })}
                    </Descriptions.Item>
                )}
                {['goods'].indexOf(orderDataState?.type) !== -1 && (
                    <Descriptions.Item
                        label={intl.formatMessage({ id: '期望时间' })}
                    >
                        {orderDataState?.show_desire_speed}
                    </Descriptions.Item>
                )}

                <Descriptions.Item
                    label={intl.formatMessage({ id: '是否推广置顶' })}
                >
                    {orderDataState &&
                        orderDataState[
                            intl.formatMessage({ id: 'item.show_is_topping' })
                        ]}
                </Descriptions.Item>
                <Descriptions.Item label={intl.formatMessage({ id: '订单号' })}>
                    {orderDataState?.order_no}
                </Descriptions.Item>
            </Descriptions>
            {orderDataState?.check_status !== '2' &&
                orderDataState?.join_order_id !== 0 && (
                    <Alert
                        style={{ marginBottom: 30 }}
                        message={
                            user_type === 'join_no'
                                ? intl.formatMessage({
                                      id: '订单还未达成合作',
                                  })
                                : intl.formatMessage({
                                      id: '您的订单正在等待后台审核，审核通过后，可达成合作',
                                  })
                        }
                        type="warning"
                    />
                )}
            {/* 参与方 - 该订单未达成合作时，可以修改参与信息 */}
            {user_type === 'join_no' && orderDataState?.join_order_id === 0 ? (
                <>
                    <Descriptions
                        title={intl.formatMessage({ id: '我参与的信息' })}
                    >
                        <Descriptions.Item
                            label={intl.formatMessage({
                                id: '当前价格排名',
                            })}
                        >
                            {orderJoinDataState &&
                                orderJoinDataState[
                                    intl.formatMessage({
                                        id: 'item.price_ranking',
                                    })
                                ]}
                        </Descriptions.Item>
                        <Descriptions.Item
                            label={intl.formatMessage({
                                id: '当前速度排名',
                            })}
                        >
                            {orderJoinDataState &&
                                orderJoinDataState[
                                    intl.formatMessage({
                                        id: 'item.speed_ranking',
                                    })
                                ]}
                        </Descriptions.Item>
                        <Descriptions.Item
                            label={intl.formatMessage({
                                id: '当前综合排名',
                            })}
                        >
                            {orderJoinDataState &&
                                orderJoinDataState[
                                    intl.formatMessage({
                                        id: 'item.num_ranking',
                                    })
                                ]}
                        </Descriptions.Item>
                    </Descriptions>
                    {/* orderJoinData-修改参与信息 */}
                    <BuildForm
                        formItems={formItems.current}
                        value={formJoin.current}
                        onFinish={onFinish}
                    >
                        <Button type="primary" htmlType="submit">
                            <FormattedMessageCustom id="提交"></FormattedMessageCustom>
                        </Button>
                    </BuildForm>
                </>
            ) : (
                <>
                    <Descriptions>
                        {countdownTime > 0 &&
                            orderDataState.join_pay_status === '1' &&
                            orderDataState.status < 8 && (
                                <Descriptions.Item
                                    label={
                                        orderJoinDataState.is_stop_countdown ===
                                        0
                                            ? intl.formatMessage({
                                                  id: '订单结束倒计时',
                                              })
                                            : intl.formatMessage({
                                                  id: '倒计时已暂停',
                                              })
                                    }
                                >
                                    <Countdown value={countdownTime} />
                                </Descriptions.Item>
                            )}
                        {user_type === 'release' &&
                            orderDataState.join_order_id !== 0 && (
                                <Descriptions.Item
                                    label={intl.formatMessage({
                                        id: '上传打款证明图片',
                                    })}
                                >
                                    <Upload
                                        defaultFileList={releasePayImgList}
                                        listType="picture-card"
                                        maxCount={1}
                                        beforeUpload={beforeUpload}
                                        onChange={releasePayImgSuccess}
                                        action={
                                            CONFIG.HTTP_REQUEST_URL +
                                            '/common/upload'
                                        }
                                    >
                                        {uploadButton}
                                    </Upload>
                                </Descriptions.Item>
                            )}
                        {/* <!--参与方确认对方打款进度--> */}
                        {user_type === 'join' &&
                            orderDataState.release_pay_status === '1' && (
                                <Descriptions.Item
                                    label={intl.formatMessage({
                                        id: '打款证明图片',
                                    })}
                                >
                                    <Upload
                                        listType="picture-card"
                                        maxCount={1}
                                        defaultFileList={releasePayImgList}
                                    >
                                        {uploadButton}
                                    </Upload>
                                    {orderDataState.join_pay_status === '0' ? (
                                        <Button onClick={doSaveJoinPayImg}>
                                            <FormattedMessage id="确认"></FormattedMessage>
                                        </Button>
                                    ) : (
                                        <Button disabled>
                                            <FormattedMessage id="已确认"></FormattedMessage>
                                        </Button>
                                    )}
                                </Descriptions.Item>
                            )}
                        {/*<!--发布方上传尾款进度图片--> */}
                        {user_type === 'release' &&
                            orderDataState.join_order_id !== 0 && (
                                <Descriptions.Item
                                    label={intl.formatMessage({
                                        id: '上传尾款证明图片',
                                    })}
                                >
                                    <Upload
                                        listType="picture-card"
                                        maxCount={1}
                                        beforeUpload={beforeUpload}
                                        onChange={releasePayEndImgSuccess}
                                        defaultFileList={releasePayEndImgList}
                                        action={
                                            CONFIG.HTTP_REQUEST_URL +
                                            '/common/upload'
                                        }
                                    >
                                        {uploadButton}
                                    </Upload>
                                </Descriptions.Item>
                            )}
                        {/*<!--参与方确认对方尾款进度--> */}
                        {user_type === 'join' &&
                            orderDataState.release_pay_end_status === '1' && (
                                <Descriptions.Item
                                    label={intl.formatMessage({
                                        id: '尾款证明图片',
                                    })}
                                >
                                    <Upload
                                        listType="picture-card"
                                        maxCount={1}
                                        defaultFileList={releasePayEndImgList}
                                    >
                                        {uploadButton}
                                    </Upload>
                                    {orderDataState.join_pay_end_status ===
                                    '0' ? (
                                        <Button onClick={doSaveJoinPayEndImg}>
                                            <FormattedMessage id="确认"></FormattedMessage>
                                        </Button>
                                    ) : (
                                        <Button disabled>
                                            <FormattedMessage id="已确认"></FormattedMessage>
                                        </Button>
                                    )}
                                </Descriptions.Item>
                            )}
                    </Descriptions>
                    {/* 合作信息 */}

                    {status == '0' && joinListDataState.length > 0 && (
                        <div style={{ marginBottom: 30 }}>
                            <Title level={4}>
                                <FormattedMessage id="合作信息"></FormattedMessage>
                            </Title>
                            <Row gutter={30} style={{ textAlign: 'center' }}>
                                <Col span={8}>
                                    <Title level={5}>
                                        <FormattedMessage id="价格"></FormattedMessage>
                                    </Title>
                                    <Select
                                        defaultValue={value1}
                                        style={{ width: '100%' }}
                                        onChange={(e) => {
                                            change(e, 'price');
                                        }}
                                        options={options1}
                                    />
                                </Col>
                                <Col span={8}>
                                    <Title level={5}>
                                        <FormattedMessage id="速度"></FormattedMessage>
                                    </Title>
                                    <Select
                                        defaultValue={value2}
                                        style={{ width: '100%' }}
                                        onChange={(e) => {
                                            change(e, 'ranking_score');
                                        }}
                                        options={options2}
                                    />
                                </Col>
                                <Col span={8}>
                                    <Title level={5}>
                                        <FormattedMessage id="综合排序"></FormattedMessage>
                                    </Title>
                                    <Select
                                        defaultValue={value3}
                                        style={{ width: '100%' }}
                                        onChange={(e) => {
                                            change(e, 'price');
                                        }}
                                        options={options3}
                                    />
                                </Col>
                            </Row>
                        </div>
                    )}
                    {status == '0' && (
                        <List
                            bordered
                            dataSource={dataes}
                            renderItem={(item) => (
                                <List.Item
                                    key={item.title}
                                    extra={
                                        <>
                                            {item.images.length !== 0 && (
                                                <Image
                                                    width={100}
                                                    height={100}
                                                    src={
                                                        CONFIG.IMAGE_URL +
                                                        item.images[0]
                                                    }
                                                />
                                            )}
                                        </>
                                    }
                                >
                                    <List.Item.Meta
                                        avatar={
                                            <>
                                                <Avatar
                                                    size={50}
                                                    src={
                                                        <img
                                                            src={
                                                                CONFIG.IMAGE_URL +
                                                                item.join_user
                                                                    .avatar
                                                            }
                                                            alt="avatar"
                                                        />
                                                    }
                                                />
                                                <span className="userName">
                                                    {lang == 'zh-CN'
                                                        ? item.join_user
                                                              .username
                                                        : item.join_user
                                                              .username_ru}
                                                </span>
                                            </>
                                        }
                                        title={
                                            <Space size={30}>
                                                <span>
                                                    <FormattedMessage id="评分"></FormattedMessage>
                                                    ：{item.join_user.rating}
                                                </span>
                                                <span>
                                                    <FormattedMessage id="综合排名"></FormattedMessage>
                                                    ：
                                                    {lang === 'zh-CN'
                                                        ? item.num_ranking
                                                        : item.num_ranking_ru}
                                                </span>
                                                <span>
                                                    <FormattedMessage id="价格排名"></FormattedMessage>
                                                    ：
                                                    {lang === 'zh-CN'
                                                        ? item.speed_ranking
                                                        : item.speed_ranking_ru}
                                                </span>
                                            </Space>
                                        }
                                        description={
                                            <Space>
                                                {item.type === 'goods' && (
                                                    <>
                                                        <span>
                                                            <FormattedMessage id="提供产品"></FormattedMessage>
                                                            ：
                                                            {lang === 'zh-CN'
                                                                ? item.product
                                                                : item.product_ru}
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="价格"></FormattedMessage>
                                                            ：{item.price}
                                                            <FormattedMessage
                                                                id={
                                                                    item.price_unit
                                                                }
                                                            ></FormattedMessage>
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="数量"></FormattedMessage>
                                                            ：{item.num}
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="速度"></FormattedMessage>
                                                            ：{item.speed}
                                                            <FormattedMessage
                                                                id={
                                                                    item.speed_unit
                                                                }
                                                            ></FormattedMessage>
                                                        </span>
                                                    </>
                                                )}
                                                {item.type ===
                                                    'crossborder' && (
                                                    <>
                                                        <span>
                                                            <FormattedMessage id="费用总价"></FormattedMessage>
                                                            ：{item.price}
                                                            <FormattedMessage
                                                                id={
                                                                    item.price_unit
                                                                }
                                                            ></FormattedMessage>
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="时效"></FormattedMessage>
                                                            ：{item.speed}
                                                            <FormattedMessage id="天"></FormattedMessage>
                                                        </span>
                                                    </>
                                                )}
                                                {item.type ===
                                                    'professional' && (
                                                    <>
                                                        <span>
                                                            <FormattedMessage id="服务内容"></FormattedMessage>
                                                            ：
                                                            {lang === 'zh-CN'
                                                                ? item.product
                                                                : item.product_ru}
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="服务报价"></FormattedMessage>
                                                            ：{item.price}
                                                            <FormattedMessage
                                                                id={
                                                                    item.price_unit
                                                                }
                                                            ></FormattedMessage>
                                                        </span>
                                                        <span>
                                                            <FormattedMessage id="服务时长"></FormattedMessage>
                                                            ：{item.speed}
                                                            <FormattedMessage id="天"></FormattedMessage>
                                                        </span>
                                                    </>
                                                )}
                                                {item.type === 'transport' && (
                                                    <>
                                                        {item.release_info
                                                            .release_type ===
                                                            '1' && (
                                                            <>
                                                                <span>
                                                                    <FormattedMessage id="提供产品"></FormattedMessage>
                                                                    ：
                                                                    {lang ===
                                                                    'zh-CN'
                                                                        ? item.product
                                                                        : item.product_ru}
                                                                </span>
                                                                <span>
                                                                    <FormattedMessage id="整车运费"></FormattedMessage>
                                                                    ：
                                                                    {item.price}
                                                                    <FormattedMessage
                                                                        id={
                                                                            item.price_unit
                                                                        }
                                                                    ></FormattedMessage>
                                                                </span>
                                                            </>
                                                        )}
                                                        {item.release_info
                                                            .release_type ===
                                                            '2' && (
                                                            <>
                                                                <span>
                                                                    <FormattedMessage id="车型"></FormattedMessage>
                                                                    ：
                                                                    {lang ===
                                                                    'zh-CN'
                                                                        ? item.car_category_id_text
                                                                        : item.car_category_id_text_ru}
                                                                </span>
                                                                <span>
                                                                    <FormattedMessage id="运费总价"></FormattedMessage>
                                                                    ：
                                                                    {item.price}
                                                                    <FormattedMessage
                                                                        id={
                                                                            item.price_unit
                                                                        }
                                                                    ></FormattedMessage>
                                                                </span>
                                                            </>
                                                        )}
                                                        {item.release_info
                                                            .release_type ===
                                                            '3' && (
                                                            <>
                                                                <span>
                                                                    <FormattedMessage id="运费"></FormattedMessage>
                                                                    ：
                                                                    {item.price}
                                                                    <FormattedMessage
                                                                        id={
                                                                            item.price_unit
                                                                        }
                                                                    ></FormattedMessage>
                                                                </span>
                                                            </>
                                                        )}
                                                    </>
                                                )}
                                            </Space>
                                        }
                                    />
                                    <Space>
                                        <Avatar
                                            shape="square"
                                            src={
                                                <img
                                                    src={
                                                        CONFIG.IMAGE_URL +
                                                        item.join_user.label[0]
                                                            .url
                                                    }
                                                    alt="avatar"
                                                />
                                            }
                                        />
                                        <ImBtn
                                            toMobile={item.join_user.mobile}
                                        ></ImBtn>
                                        <Button
                                            type="primary"
                                            onClick={() => {
                                                cooperate1(item);
                                            }}
                                        >
                                            <FormattedMessageCustom id="选择合作"></FormattedMessageCustom>
                                        </Button>
                                    </Space>
                                </List.Item>
                            )}
                        />
                    )}
                    {status == '1' && (
                        <CardReveal
                            cardArr={orderJoin.current}
                            title={intl.formatMessage({ id: '提供信息' })}
                        ></CardReveal>
                    )}
                    {status == '0' && user_type === 'join' && (
                        <CardReveal
                            cardArr={orderJoin.current}
                            title={intl.formatMessage({ id: '提供信息' })}
                        ></CardReveal>
                    )}
                    {/* 提供信息 */}
                    {['2', '6', '8', '9', '10'].indexOf(status) !== -1 &&
                        orderDataState?.check_status === '2' && (
                            <OrderStep
                                list={stepList}
                                title={intl.formatMessage({ id: '完成情况' })}
                            />
                        )}
                    {status === '2' &&
                        user_type === 'join' &&
                        orderDataState?.check_status === '2' && (
                            <SubmitStep
                                onFinish={(e, form) => {
                                    sendStepFun(e, form);
                                }}
                            >
                                <Button type="primary" htmlType="submit">
                                    <FormattedMessage id="上传进度"></FormattedMessage>
                                </Button>
                            </SubmitStep>
                        )}
                    {status !== '0' && (
                        <Space style={{textAlign:"right"}}>
                            {['8', '10'].indexOf(status) !== -1 &&
                                user_type === 'release' &&
                                lang === 'zh-CN' && (
                                    <Button
                                        type="primary"
                                        onClick={goAfterSale}
                                    >
                                        <FormattedMessage id="申请售后"></FormattedMessage>
                                    </Button>
                                )}
                            {(joinListDataState.length > 0 || status !== '0') && (
                                <ImBtn toMobile={to_mobile}></ImBtn>
                            )}
                            {status === '0' && user_type === 'join' && (
                                <ImBtn toMobile={to_mobile}></ImBtn>
                            )}
                            {['0', '1'].indexOf(status) !== -1 &&
                                user_type === 'join' && (
                                    <Button
                                        onClick={stopJoinFun}
                                        type="primary"
                                    >
                                        <FormattedMessage id="终止参与"></FormattedMessage>
                                    </Button>
                                )}
                            {(joinListDataState.length > 0 ||
                                status !== '0') && (
                                <>
                                    {status === '0' && (
                                        <Button
                                            onClick={cooperate}
                                            type="primary"
                                        >
                                            <FormattedMessage id="选择合作"></FormattedMessage>
                                        </Button>
                                    )}
                                    {status === '1' && (
                                        <Button
                                            onClick={stopJoinFun}
                                            type="primary"
                                        >
                                            <FormattedMessage id="终止参与"></FormattedMessage>
                                        </Button>
                                    )}
                                    {status === '2' &&
                                        user_type === 'release' && (
                                            <Button
                                                onClick={orderConfirm}
                                                type="primary"
                                            >
                                                <FormattedMessage id="确认收货"></FormattedMessage>
                                            </Button>
                                        )}
                                    {status === '6' &&
                                        user_type === 'release' && (
                                            <Button disabled type="primary">
                                                <FormattedMessage id="已确认收货"></FormattedMessage>
                                            </Button>
                                        )}
                                    {status === '6' && user_type === 'join' && (
                                        <Button
                                            type="primary"
                                            onClick={() => {
                                                showJoin('10');
                                            }}
                                        >
                                            <FormattedMessage id="对方已确认收货"></FormattedMessage>
                                        </Button>
                                    )}
                                    {['8', '10'].indexOf(status) !== -1 && (
                                        <Button
                                            type="primary"
                                            onClick={doEvaluate}
                                        >
                                            {orderDataState?.release_rate_status ===
                                                '1' &&
                                            user_type === 'release' ? (
                                                <FormattedMessage id="已评价"></FormattedMessage>
                                            ) : (
                                                <>
                                                    {orderDataState?.join_rate_status ===
                                                        '1' &&
                                                    user_type === 'join' ? (
                                                        <FormattedMessage id="已评价"></FormattedMessage>
                                                    ) : (
                                                        <FormattedMessage id="立即评价"></FormattedMessage>
                                                    )}
                                                </>
                                            )}
                                        </Button>
                                    )}
                                    {['9'].indexOf(status) !== -1 &&
                                        user_type === 'join' && (
                                            <Button
                                                type="primary"
                                                onClick={() => {
                                                    showJoin('10');
                                                }}
                                            >
                                                <FormattedMessage id="未付款"></FormattedMessage>
                                            </Button>
                                        )}
                                    {['9'].indexOf(status) !== -1 &&
                                        user_type === 'release' && (
                                            <Button disabled type="primary">
                                                <FormattedMessage id="对方未收到全款"></FormattedMessage>
                                            </Button>
                                        )}
                                </>
                            )}
                        </Space>
                    )}
                </>
            )}
        </>
    );
};
export default NewsForm;
